import { BaseController } from '../BaseController';
import {Md5} from 'ts-md5/dist/md5';
import {PaymentLogger} from '../../Logger';

// http://wiki.open.qq.com/wiki/mobile/%E8%B4%AD%E4%B9%B0%E9%81%93%E5%85%B7%E6%89%A3%E6%AC%BE%E6%88%90%E5%8A%9F%E5%9B%9E%E8%B0%83%E5%BA%94%E7%94%A8%E5%8F%91%E8%B4%A7

export class tencent extends BaseController {
    protected SECRET: string = "";

    async Start(){
        try{
            PaymentLogger.info("Tencent info: " + JSON.stringify(this.request.body));
        }catch(e){
            PaymentLogger.error("Tencent error: " + <string>e + " body: " + JSON.stringify(this.request.body));
        }finally{
            this.defaultResponse();
        }
        
    }

    private defaultResponse(){
        let ret = {
            ret: 0,
            msg: "OK"
        }
        this.response.send(JSON.stringify(ret));
    }
}
